apiVersion: apps/v1
kind: Deployment
metadata:
  name: external-dns
  namespace: external-dns
  labels:
    k8s-app: external-dns
spec:
  replicas: 1
  selector:
    matchLabels:
      k8s-app: external-dns
  template:
    metadata:
      annotations:
        scheduler.alpha.kubernetes.io/critical-pod: ""
      labels:
        k8s-app: external-dns
    spec:
      serviceAccountName: external-dns
      tolerations:
      - key: CriticalAddonsOnly
        operator: Exists
      - effect: NoSchedule
        key: node-role.kubernetes.io/master
      containers:
      - name: external-dns
        image: registry.opensource.zalan.do/teapot/external-dns:v0.5.4
        env:
        - name: ETCD_URLS
          value: "http://coredns-etcd:{{ ETCD_PORT }}"
        args:
        - --provider=coredns
        - --source=service
        - --source=ingress
        - --registry=txt
        - --interval=15s
        - --log-level=debug
        # - --fqdn-template="{% raw %}{{.Namespace}}{% endraw %}.{{ local_domain }}"
        # - --domain-filter={{ local_domain }}
        # - --namespace=default
        # - --txt-owner-id=default.{{ local_domain }}
        # - --metrics-address=":7979"
